var appInstance = getApp(), apiConfig = {
    api: "entry/wxapp/",
    m: "goouc_fullexam"
};

module.exports = {
    post: function(apiEndpoint, requestData) {
        return new Promise(function(resolve, reject) {
            requestData || (requestData = {}), requestData.m = apiConfig.m, appInstance.util.request({
                url: apiConfig.api + apiEndpoint,
                data: requestData,
                method: "post",
                header: {},
                success: function(response) {
                    resolve(response.data);
                },
                fail: function(error) {
                    reject(error.data);
                }
            });
        });
    }
};